﻿<phone:PhoneApplicationPage 
    x:Class="XMPPClient.OptionsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="696" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="XMPP Client" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="Options" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <ScrollViewer>
                <StackPanel>
                    <toolkit:ToggleSwitch FontSize="22" x:Name="ToggleRunScreenLock" IsChecked="{Binding RunWithScreenLocked,Mode=TwoWay}">Run with screen locked</toolkit:ToggleSwitch>
                    <toolkit:ToggleSwitch FontSize="22" x:Name="ToggleLogDebug" IsChecked="{Binding LogDebug,Mode=TwoWay}">Log Debug</toolkit:ToggleSwitch>
                    <toolkit:ToggleSwitch FontSize="22" x:Name="ToggleLogXML" IsChecked="{Binding LogXML,Mode=TwoWay}">Log XML</toolkit:ToggleSwitch>
                    <toolkit:ToggleSwitch FontSize="22" x:Name="ToggleSavePasswords" IsChecked="{Binding SavePasswords,Mode=TwoWay}">Save Passwords</toolkit:ToggleSwitch>
                    <toolkit:ToggleSwitch FontSize="22" x:Name="TogglePlaySounds" IsChecked="{Binding PlaySoundOnNewMessage,Mode=TwoWay}">Play Sound On New Message</toolkit:ToggleSwitch>
                    <toolkit:ToggleSwitch FontSize="22" x:Name="ToggleVibrate" IsChecked="{Binding VibrateOnNewMessage,Mode=TwoWay}">Vibrate On New Message</toolkit:ToggleSwitch>
                    <toolkit:ToggleSwitch FontSize="22" x:Name="ToggleSendGeoCoords" IsChecked="{Binding SendGeoCoordinates,Mode=TwoWay}" ToolTipService.ToolTip="Aquire lat/long from the GPS service and update them in your personal presence node">Send Geo-Coordinates</toolkit:ToggleSwitch>
                    <Grid>
                        <TextBlock Margin="10,0,0,0" VerticalAlignment="Center">GeoTime Frequency in seconds</TextBlock>
                        <TextBox HorizontalAlignment="Right" Margin="0,0,30,0" x:Name="TextBoxGeoFreq" Width="100" FontSize="22" Text="{Binding GeoTimeFrequency,Mode=TwoWay}" />
                    </Grid>
                    <toolkit:ToggleSwitch FontSize="22" x:Name="ToggleUseOnlyIBB" IsChecked="{Binding UseOnlyIBBFileTransfer,Mode=TwoWay}" ToolTipService.ToolTip="Only use inband-byte streams for sending files.">Use only inband file transfer</toolkit:ToggleSwitch>
                    <TextBlock ToolTipService.ToolTip="The SOCKS5 Bytestream proxy to use if one is not provided by the XMPP Host.  Use this to prevent falling back to IBB file transfers">SOCKS5 Bytestream Proxy</TextBlock>
                    <TextBox x:Name="TextBoxAlternateProxy" FontSize="22" Text="{Binding SOCKS5ByteStreamProxy,Mode=TwoWay}" />

                </StackPanel>
            </ScrollViewer>
            
        </Grid>
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/file.png" x:Name="ButtonDumpLog" Click="ButtonDumpLog_Click" Text="Dump Log"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>
